<html>
<head><meta charset="utf-8"><title>nonascii identifiers(rfc 2457) · t-lang · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/index.html">t-lang</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html">nonascii identifiers(rfc 2457)</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="197135409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197135409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197135409">(May 11 2020 at 12:06)</a>:</h4>
<p>Hello, let me create a topic to discuss and confirm on the details of RFC 2457.</p>



<a name="197135445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197135445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197135445">(May 11 2020 at 12:07)</a>:</h4>
<p>The RFC text is at <a href="https://github.com/rust-lang/rfcs/blob/master/text/2457-non-ascii-idents.md">https://github.com/rust-lang/rfcs/blob/master/text/2457-non-ascii-idents.md</a></p>



<a name="197136152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197136152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197136152">(May 11 2020 at 12:14)</a>:</h4>
<p>The RFC basically contains 6 major things.</p>
<ol>
<li>Tweak to the language parser: identifier grammar, nfc normalization (implemented, feature gated)</li>
<li>Concerns about <code>#[no_mangle]</code> and <code>#[path]</code> (not yet implemented)</li>
<li><code>confusable_idents</code> lint, detects similarity between identifiers (implemented, discussing adjusting its behavior)</li>
<li><code>uncommon_codepoints</code> lint, detects code points not usually occurred (implemented)</li>
<li><code>nonstandard_style</code> lint tweaks, basically nothing to do. (need confirmation)</li>
<li><code>mixed_script_confusables</code> lint, detects scripts that occurred in the crate but all occurrences are considered confusable. (not yet implemented)</li>
</ol>



<a name="197136522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197136522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197136522">(May 11 2020 at 12:18)</a>:</h4>
<p>In rationale section, there're two alternative <code>mixed_script_detection</code> lints that are NOT currently selected by this RFC.<br>
a. single identifier mixed script detection.<br>
b. a statistics approach of mixed script detection.</p>



<a name="197136644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197136644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197136644">(May 11 2020 at 12:20)</a>:</h4>
<p>Just create this summary to make sure we're on the same page =)</p>



<a name="197136668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197136668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197136668">(May 11 2020 at 12:20)</a>:</h4>
<p><span class="user-mention" data-user-id="132040">@Manish Goregaokar</span> <span class="user-mention" data-user-id="239881">@Josh Triplett</span></p>



<a name="197155354"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197155354" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197155354">(May 11 2020 at 14:45)</a>:</h4>
<p>.</p>



<a name="197155742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197155742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197155742">(May 11 2020 at 14:47)</a>:</h4>
<p>So yeah I think your assessment is correct. We can instead have the confusable_idents lint only focus on mixed script confusables, and mixed_script_confusables continues to do a global analysis.</p>



<a name="197155861"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197155861" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197155861">(May 11 2020 at 14:48)</a>:</h4>
<p>either way, the list of mixed script confusable characters is much smaller, so you don't actually need the skeleton code for this.</p>



<a name="197155942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197155942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197155942">(May 11 2020 at 14:49)</a>:</h4>
<p>Actually this could probably be a single mixed_script_confsables lint, without the percentage check</p>



<a name="197157645"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197157645" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pyfisch <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197157645">(May 11 2020 at 14:59)</a>:</h4>
<p>Removing the skeleton code means the compiler no longer warns about two otherwise identical idents with different diacritics, right?<br>
There are quite a few diacritics and they are not all that easy to see and tell apart: <a href="https://en.wikipedia.org/wiki/Combining_Diacritical_Marks">https://en.wikipedia.org/wiki/Combining_Diacritical_Marks</a></p>



<a name="197172086"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197172086" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197172086">(May 11 2020 at 16:37)</a>:</h4>
<p>Well, the hardest thing about confusables.txt is that it's not one-to-one. The list itself doesn't really talk about one code point and another code point are confusable, instead it is mapping code points into intermediate forms.</p>



<a name="197172666"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197172666" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197172666">(May 11 2020 at 16:42)</a>:</h4>
<p><a href="https://github.com/unicode-rs/unicode-security/pull/13">https://github.com/unicode-rs/unicode-security/pull/13</a><br>
This newly written table generation code consist of all the one-to-one cases, and found out the directly mentioned one-to-many cases, but doesn't handle the A+B confusable to C+D case, which is really tricky to implement and use...</p>



<a name="197173078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197173078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197173078">(May 11 2020 at 16:45)</a>:</h4>
<p>If we really want to find the confusable identifiers pairs that are mixed script, i think the only feasible way to still use the skeleton code to find out the confusables, and then filter the mixed script pairs out. If this plan is acceptable, i might give the implementation a try.</p>



<a name="197174201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197174201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197174201">(May 11 2020 at 16:55)</a>:</h4>
<p>That or preprocess the confusables data.</p>



<a name="197174211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197174211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197174211">(May 11 2020 at 16:55)</a>:</h4>
<p>To make it easier to figure that out.</p>



<a name="197174247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197174247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197174247">(May 11 2020 at 16:55)</a>:</h4>
<p>For instance, a character that's only confusable with others in the same script isn't something we need flagged.</p>



<a name="197176268"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197176268" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197176268">(May 11 2020 at 17:12)</a>:</h4>
<p>This is basically "reverse apply"-ing the confusables data. The original table is reductive, it maps random data into a normalized form to check for equivalence. To reverse apply it, the data will become generative.</p>



<a name="197176371"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197176371" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197176371">(May 11 2020 at 17:12)</a>:</h4>
<p>let me take a random example, here are two lines from the table</p>
<div class="codehilite"><pre><span></span><code>00F8 ;  006F 0338 ; MA  # ( ø → o̸ ) LATIN SMALL LETTER O WITH STROKE → LATIN SMALL LETTER O, COMBINING LONG SOLIDUS OVERLAY    # →o̷→
1D428 ; 006F ;  MA  # ( 𝐨 → o ) MATHEMATICAL BOLD SMALL O → LATIN SMALL LETTER O    #
</code></pre></div>



<a name="197176566"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197176566" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197176566">(May 11 2020 at 17:14)</a>:</h4>
<p>From these two lines, we know that:<br>
00F8 and  1D428 0338 are confusable.</p>



<a name="197176711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197176711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197176711">(May 11 2020 at 17:15)</a>:</h4>
<p>By first applying the second-line substitution, then applying the first-line substitution, they both fold into <code>006F 0338</code> form.</p>



<a name="197177112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197177112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197177112">(May 11 2020 at 17:18)</a>:</h4>
<p>There're even chaining cases, i believe. So... it's much more complex to prepare this data. I'm not sure we should dive into this approach...</p>



<a name="197178103"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197178103" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197178103">(May 11 2020 at 17:26)</a>:</h4>
<p>Instead, when we've got 00F8 identifier and 1D428 0338 identifier at hand, and we know they're confusable using skeleton approach, we just need some simple rules to tell whether they're same script confusable or not, this will be much easier.</p>



<a name="197312463"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197312463" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197312463">(May 12 2020 at 17:47)</a>:</h4>
<p><span class="user-mention" data-user-id="300894">@Pyfisch</span> I'm not sure i understand the "script group" concept from the <code>mixed_script_confusable</code> lint part of the RFC.</p>



<a name="197314897"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197314897" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197314897">(May 12 2020 at 18:03)</a>:</h4>
<p>The second paragraph "We identify lists of code points which are Allowed by UTS 39 section 3.1 (i.e., code points not already linted by less_used_codepoints) and are "exact" confusables between code points from other Allowed scripts." I think this means that this is pure-preprocessing and does not depend on the actual codebase. I have created such a list.</p>



<a name="197315444"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197315444" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197315444">(May 12 2020 at 18:07)</a>:</h4>
<p>In the fourth paragraph "In a code base, if the only code points from a given script group (aside from Latin, Common, and Inherited) are such exact confusables", is this the <code>Script</code> property of the UCD, or should i take <code>Script_Extensions</code> property into account, or should i use the TR39 augmented script set concept?</p>



<a name="197316322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197316322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197316322">(May 12 2020 at 18:14)</a>:</h4>
<p><span class="user-mention" data-user-id="116458">@Charles Lew</span> it's the augmented script set</p>



<a name="197317031"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197317031" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197317031">(May 12 2020 at 18:20)</a>:</h4>
<p>Thanks, so, each code point corresponds to a augmented script set, and we need to check how many kinds of augmented script set occurred in this code base. And for each of them, whether its "source" code points  only consists of confusable code points.</p>



<a name="197317064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197317064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197317064">(May 12 2020 at 18:20)</a>:</h4>
<p>Is this correct?</p>



<a name="197391604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197391604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pyfisch <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197391604">(May 13 2020 at 10:09)</a>:</h4>
<p>I still don't understand why you only want to warn about confusable idents from different scripts. To me it does not matter whether two identifiers I confuse are written in the same or in different scripts. Since only warning about some confusable identifiers is harder to implement there must be some advantage to this that I am missing.</p>



<a name="197393286"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197393286" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pyfisch <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197393286">(May 13 2020 at 10:26)</a>:</h4>
<p><span class="user-mention" data-user-id="116458">@Charles Lew</span> In general "script groups" are scripts that are commonly used together. For example Japanese is written in a mixture of Kanji + Hiragana + Katakana. I think the term was invented in the RFC and is not otherwise used. In the section "Alternative mixed script lints", subsection "Mixed script detection" lint is described. It restricts identifiers to characters from the same script or set of scripts as described in <a href="https://www.unicode.org/reports/tr39/#Restriction_Level_Detection">https://www.unicode.org/reports/tr39/#Restriction_Level_Detection</a> But this lint is not part of the accepted RFC.</p>
<p>The <code>mixed_script_confusable</code> lint part was written by <span class="user-mention" data-user-id="132040">@Manish Goregaokar</span> and you better ask him how he defines "script groups".</p>



<a name="197423066"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197423066" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197423066">(May 13 2020 at 14:47)</a>:</h4>
<p><span class="user-mention" data-user-id="300894">@Pyfisch</span> so firstly the mixed_script_confusables lint already has all the implementation work necessary to warn about cross-script confusables. This isn't additional work.</p>
<p>The idea is that users of a script will typically not have a problem with this, and it will be solved with fonts or whatever. Now, it is true that some scripts like the perso-arabic script have confusables from different languages that both exist in the same script, and that might be tricky. But I'd rather wait for feedback on that before writing that lint.</p>



<a name="197423097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197423097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197423097">(May 13 2020 at 14:47)</a>:</h4>
<p>Yes, by script groups I'm talking about the augmented script sets</p>



<a name="197423135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197423135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197423135">(May 13 2020 at 14:47)</a>:</h4>
<p><span class="user-mention" data-user-id="116458">@Charles Lew</span> each code point may correspond to multiple augmented script sets</p>



<a name="197423238"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197423238" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197423238">(May 13 2020 at 14:48)</a>:</h4>
<p>actually no sorry</p>



<a name="197423520"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197423520" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197423520">(May 13 2020 at 14:50)</a>:</h4>
<p><span class="user-mention" data-user-id="116458">@Charles Lew</span> it's just <a href="https://github.com/unicode-rs/unicode-security/blob/master/src/mixed_script.rs#L9">https://github.com/unicode-rs/unicode-security/blob/master/src/mixed_script.rs#L9</a></p>



<a name="197449354"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197449354" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pyfisch <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197449354">(May 13 2020 at 17:40)</a>:</h4>
<p><span class="user-mention" data-user-id="132040">@Manish Goregaokar</span> okay, I understand. Would you mind updating the RFC?</p>



<a name="197550337"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197550337" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197550337">(May 14 2020 at 13:10)</a>:</h4>
<p>From my understanding augmented script set is  <code>script extension</code> property extended to capture CJK languages which uses more than one scripts together. However from the RFC text, the usage is a little, um, strange. </p>
<p>Let me create an example, assume there's somehow a piece of <code>lib.rs</code> that is written solely using Hiragana and Katakana, both are script that are related to the Japanese language.  So their corresponding augmented script sets are (1) Hiragana + Jpan  (2) Katakana + Jpan , and ... there're two kinds of augmented script sets? So imagine if all texts are Hiragana, only one Katakana codepoint, and if the Katakana codepoint is confusable to, say, a Hiragana codepoint, then it's reported as mixed_script_confusable. Is this correct?</p>



<a name="197699036"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197699036" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197699036">(May 15 2020 at 14:27)</a>:</h4>
<p><span class="user-mention" data-user-id="300894">@Pyfisch</span> i'm really swamped right now, i can review any changs y'all make</p>



<a name="197699155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197699155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197699155">(May 15 2020 at 14:28)</a>:</h4>
<p><span class="user-mention" data-user-id="116458">@Charles Lew</span> no, we should use augmented script sets there, katakana should not be reported as confusable with hiragana</p>



<a name="197714493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/197714493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#197714493">(May 15 2020 at 16:10)</a>:</h4>
<p><span class="user-mention" data-user-id="132040">@Manish Goregaokar</span> Sorry, it wan't clear to me how that works. Yes i'm thinking with augmented script set. While i think i do understand the intention, i can't really figure out the exactly rules for implementation, it seems not very straight forward to me, but maybe i'm just missing something obvious.  Would you mind explaining it more? Either a brief description of rule or an example works for me. I think then i can work out the details.</p>



<a name="198218868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/198218868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#198218868">(May 20 2020 at 15:55)</a>:</h4>
<p><span class="user-mention" data-user-id="116458">@Charles Lew</span> you are correct in your understanding of augmented script sets, _however_ the point of script sets is to intersect them. A+B and A+C are not considered incompatible, because they have the nonzero intersection of A</p>



<a name="198219359"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/198219359" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#198219359">(May 20 2020 at 15:58)</a>:</h4>
<p>-</p>



<a name="198219458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/198219458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#198219458">(May 20 2020 at 15:58)</a>:</h4>
<p>Yeah, that's my understanding too.</p>



<a name="198219553"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/198219553" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#198219553">(May 20 2020 at 15:59)</a>:</h4>
<p>So i think we need to invent some rules for the mixed script lint here. Actually we first collect all code points in a crate.</p>



<a name="198219692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/198219692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#198219692">(May 20 2020 at 16:00)</a>:</h4>
<p>And find its corresponding augmented scripted set for each of the code point.</p>



<a name="198219789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/198219789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#198219789">(May 20 2020 at 16:01)</a>:</h4>
<p>And then, maybe we want to intersect each pair of the augmented script set to see if the intersection is empty?</p>



<a name="198219946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/198219946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#198219946">(May 20 2020 at 16:02)</a>:</h4>
<p>No, i think it sounds that this will need to operate on the identifier level. To check if there's an intersection which means the identifier itself is single script.</p>



<a name="211417507"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211417507" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jed <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211417507">(Sep 27 2020 at 13:50)</a>:</h4>
<p>Is there a good way to allow operators such as unicode nabla in identifiers? With <code>#[feature(non_ascii_idents)]</code>, I get</p>
<div class="codehilite"><pre><span></span><code>error: unknown start of token: \u{2207}
  --&gt; src/main.rs:12:9
   |
12 |     let ∇u = 3;
   |         ^
</code></pre></div>


<p>yet this would be popular notation for scientific computing and numerical solvers. Julia is significantly <a href="https://docs.julialang.org/en/v1/manual/variables/#Allowed-Variable-Names">more inclusive</a> than what I understand of the <a href="https://github.com/rust-lang/rust/issues/55467">proposal</a> for Rust.</p>



<a name="211418183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211418183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211418183">(Sep 27 2020 at 14:06)</a>:</h4>
<p>Rust uses the <code>XID_Start</code> unicode group which is specifically made for identifier starts: <a href="https://github.com/rust-lang/rust/blob/b8363295d555494bbaa119eba8b16a3057e6728c/compiler/rustc_lexer/src/lib.rs#L266">https://github.com/rust-lang/rust/blob/b8363295d555494bbaa119eba8b16a3057e6728c/compiler/rustc_lexer/src/lib.rs#L266</a></p>



<a name="211418202"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211418202" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211418202">(Sep 27 2020 at 14:07)</a>:</h4>
<p>If you want to change it you will have to change <code>is_id_start</code> and <code>is_id_continue</code>.</p>



<a name="211420901"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211420901" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jed <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211420901">(Sep 27 2020 at 15:21)</a>:</h4>
<p>Unfortunately, nabla is in the Sm category alongside (mostly) binary operators. <a href="http://www.fileformat.info/info/unicode/category/Sm/list.htm">http://www.fileformat.info/info/unicode/category/Sm/list.htm</a><br>
There are a handful of useful identifier symbols in that category, but I think it would involve explicitly allowing them like Rust does for <code>_</code> and Julia does for a longer list:<br>
<a href="https://github.com/JuliaLang/julia/blob/master/src/flisp/julia_extensions.c#L67-L122">https://github.com/JuliaLang/julia/blob/master/src/flisp/julia_extensions.c#L67-L122</a><br>
Is this sort of extension something in-scope for this RFC, and if so, would it be more effective to start with a PR or try to build consensus in discussion first? (I don't know this community well enough to anticipate objections.)</p>



<a name="211423160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211423160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> kennytm <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211423160">(Sep 27 2020 at 16:17)</a>:</h4>
<p>as a workaround you could use characters from the Canadian Aboriginal Syllabics block <span aria-label="upside down" class="emoji emoji-1f643" role="img" title="upside down">:upside_down:</span> <code>let ᐁu = 3;</code></p>



<a name="211423373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211423373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211423373">(Sep 27 2020 at 16:22)</a>:</h4>
<p>potayto potahto</p>



<a name="211423394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211423394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211423394">(Sep 27 2020 at 16:23)</a>:</h4>
<p>that will be warned with <code>uncommon_codepoints</code> lint though.</p>



<a name="211423603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211423603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211423603">(Sep 27 2020 at 16:28)</a>:</h4>
<p><span class="user-mention" data-user-id="322310">@Jed</span> The original proposal was very much aiming for allowing words in other languages, rather than arbitrary symbols/emoji/etc.</p>
<p>One (of several) potential issues with allowing a broader set of symbols would be whether such symbols should be lexed as part of identifiers, or whether we might ever want to allow them as operators or some other part of syntax instead.</p>



<a name="211423608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211423608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211423608">(Sep 27 2020 at 16:28)</a>:</h4>
<p>Once something is lexed as an identifier, we can't change that.</p>



<a name="211423760"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211423760" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211423760">(Sep 27 2020 at 16:33)</a>:</h4>
<p>The primary motivating use case for non-ASCII identifiers was supporting other (human) languages, allowing people to code in their language of choice.</p>



<a name="211423763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211423763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211423763">(Sep 27 2020 at 16:33)</a>:</h4>
<p>maybe there could be a proc-macro that transforms<br>
<code>let sym!("∇u") = 3;</code><br>
into <br>
<code>let nabla_u = 3;</code></p>



<a name="211423815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211423815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211423815">(Sep 27 2020 at 16:34)</a>:</h4>
<p>yeah, mainly allowing designing apis using their language of choice.</p>



<a name="211424627"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211424627" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jed <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211424627">(Sep 27 2020 at 16:57)</a>:</h4>
<p>That all makes sense. New binary operators are great for literate math, but often much less so for data structure reuse in optimized libraries. There are plausible use cases for <code>∇</code> as unary operator, though I'd personally prefer <code>∇(u)</code> in such a circumstance (and there are Julia libraries that use this syntax). My motivation here would be to encourage implementing numerical/math libraries in Rust as a sort of intermediate between the classic C/Fortran languages and more domain-specific (Julia) that have a heavier runtime and are harder to bind and package/distribute for use from other languages.</p>
<p>I think being conservative with identifiers is warranted, but there is a strong case for <code>∇</code> and a few others.</p>



<a name="211424711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211424711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211424711">(Sep 27 2020 at 16:59)</a>:</h4>
<p>if we're going to allow custom operators, we should allow people to just glom together ascii symbols like a <em>proper</em> language does.</p>



<a name="211425144"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211425144" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211425144">(Sep 27 2020 at 17:08)</a>:</h4>
<p>That would prevent people from writing the equivalent of x+y without spaces.</p>



<a name="211425161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211425161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jed <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211425161">(Sep 27 2020 at 17:09)</a>:</h4>
<p>Do you mean like Haskell <code>a &gt;&gt;= b</code>? I don't particularly care on this front. Custom infix operators are nice for embedded DSLs, but aren't something I would use much in library implementation. But I think <code>a ⊗ b</code> is more clear than some sequence of ASCII symbols <code>a &lt;*&gt; b</code> or some such.</p>



<a name="211425333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211425333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211425333">(Sep 27 2020 at 17:13)</a>:</h4>
<p><em>that's</em> what <code>&lt;*&gt;</code> means</p>



<a name="211425336"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211425336" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211425336">(Sep 27 2020 at 17:13)</a>:</h4>
<p>wow you've just cleared up a lot of haskell for me <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="211425753"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211425753" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211425753">(Sep 27 2020 at 17:23)</a>:</h4>
<p><span class="user-mention" data-user-id="239881">@Josh Triplett</span> I don't understand how that follows.</p>



<a name="211426005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211426005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211426005">(Sep 27 2020 at 17:28)</a>:</h4>
<p><span class="user-mention" data-user-id="224471">@Lokathor</span> The lexer needs to know where one token stops and the next begins.</p>



<a name="211426028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211426028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211426028">(Sep 27 2020 at 17:29)</a>:</h4>
<p>So it needs to know which symbols can be part of identifiers, and which symbols cannot.</p>



<a name="211426039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211426039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211426039">(Sep 27 2020 at 17:29)</a>:</h4>
<p>If the same symbols can be part of both, there's ambiguity.</p>



<a name="211426110"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211426110" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211426110">(Sep 27 2020 at 17:30)</a>:</h4>
<p>Sorry, right, my mistake. When I said "symbol" i meant the <del>Haskell</del> <em>proper</em> language usage of the word, where it's limited to non-alphanumeric characters. So, <code>x+y</code> is unambiguiously <code>x</code> (alphanum) then <code>+</code> (non-alphanum) then <code>y</code> (alphanum)</p>



<a name="211431588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211431588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jed <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211431588">(Sep 27 2020 at 19:51)</a>:</h4>
<p>Related: should the <code>mixed_script_confusables</code> lint be so strict as to prevent use of Greek letters in otherwise-Latin code? Seems like<code>φ</code> as an identifier isn't "confusable" so much as imposing a style guide. (I find Julia's use of Greek and math symbols somewhat gratuitous, but there is definitely a set of users who like their code to look as close as possible to the mathematical methods paper.)</p>



<a name="211432340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211432340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211432340">(Sep 27 2020 at 20:08)</a>:</h4>
<p>I don't think that should trigger the lint; if it is, there's a problem. It's meant to flag cases where the only identifiers used from a given script have identical letterforms to other scripts.</p>



<a name="211432344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211432344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211432344">(Sep 27 2020 at 20:09)</a>:</h4>
<p><code>φ</code> shouldn't trigger that; it doesn't have an identical letterform.</p>



<a name="211432422"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211432422" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211432422">(Sep 27 2020 at 20:10)</a>:</h4>
<p>There are a few Greek letters that might, such as omicron (which looks identical to <code>o</code>/<code>O</code>); if those were the <em>only</em> such Greek letters you used, you might get that lint, and in that case it'd be working as intended.</p>



<a name="211432519"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211432519" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211432519">(Sep 27 2020 at 20:13)</a>:</h4>
<p>I think that list would include:<br>
possibly capital beta, capital epsilon, capital zeta, capital eta, capital iota, capital kappa, capital mu, capital nu, capital and lowercase omicron, capital phi, capital tau, capital upsilon, and capital chi.</p>



<a name="211432528"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211432528" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211432528">(Sep 27 2020 at 20:13)</a>:</h4>
<p>Anything else shouldn't be on the list of confusables.</p>



<a name="211432598"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211432598" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211432598">(Sep 27 2020 at 20:14)</a>:</h4>
<p>If you have a test case where something like <code>φ</code> is triggering the lint, please do report it. Feel free to use any of what I wrote above in doing so, if that helps.</p>



<a name="211432632"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211432632" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211432632">(Sep 27 2020 at 20:15)</a>:</h4>
<p><span class="user-mention" data-user-id="239881">@Josh Triplett</span> I believe unicode treats greek and latin as confusable as in <code>ɸ</code> and <code>φ</code>.</p>



<a name="211432674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211432674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211432674">(Sep 27 2020 at 20:16)</a>:</h4>
<p>Which depending on the font look identical.</p>



<a name="211432688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211432688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jed <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211432688">(Sep 27 2020 at 20:16)</a>:</h4>
<div class="codehilite"><pre><span></span><code>$ cargo +nightly build
warning: The usage of Script Group `Greek` in this crate consists solely of mixed script confusables
  --&gt; src/main.rs:12:9
   |
12 |     let φ = 3;
   |         ^
   |
   = note: `#[warn(mixed_script_confusables)]` on by default
   = note: The usage includes &#39;φ&#39; (U+03C6).
   = note: Please recheck to make sure their usages are indeed what you want.
</code></pre></div>


<p>Same with other letters I've tried, such as <code>β</code>.</p>



<a name="211432760"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211432760" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jed <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211432760">(Sep 27 2020 at 20:18)</a>:</h4>
<p>Latin ɸ:</p>
<div class="codehilite"><pre><span></span><code>warning: identifier contains uncommon Unicode codepoints
  --&gt; src/main.rs:12:9
   |
12 |     let ɸ = 3;
   |         ^
   |
   = note: `#[warn(uncommon_codepoints)]` on by default
</code></pre></div>



<a name="211432840"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211432840" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211432840">(Sep 27 2020 at 20:20)</a>:</h4>
<p>I had no idea that there were duplicate copies of that codepoint. :(</p>



<a name="211432851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211432851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211432851">(Sep 27 2020 at 20:21)</a>:</h4>
<p>Sigh.</p>



<a name="211432927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211432927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211432927">(Sep 27 2020 at 20:23)</a>:</h4>
<p>Ideally, you'd only get a warning about those symbols if you're actually using multiple variants of it.</p>



<a name="211432930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211432930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211432930">(Sep 27 2020 at 20:23)</a>:</h4>
<p>That's a challenge to check, though.</p>



<a name="211432973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211432973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jed <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211432973">(Sep 27 2020 at 20:24)</a>:</h4>
<p>FWIW, they look quite different in DejaVu Sans Mono. Anyway, the <code>mixed_script_confusables</code> also fires on <code>θ</code> (Greek small theta), for which there is no Latin counterpart.</p>



<a name="211433482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211433482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211433482">(Sep 27 2020 at 20:37)</a>:</h4>
<p><span class="user-mention" data-user-id="322310">@Jed</span> That can be confused with <code>O̵</code> which is an uppercase O with a horizontal stroke (u0335).  The lint should probably tell you what the other confusable characters are.</p>



<a name="211433616"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211433616" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211433616">(Sep 27 2020 at 20:40)</a>:</h4>
<p>Those look very different as well.</p>



<a name="211433625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211433625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211433625">(Sep 27 2020 at 20:41)</a>:</h4>
<p>It should definitely tell you the other characters it could be confused with, and also, in cases like that it <em>really</em> shouldn't lint unless you're actually using the other confusable characters.</p>



<a name="211433634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211433634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jed <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211433634">(Sep 27 2020 at 20:41)</a>:</h4>
<p>Ah, I found one that doesn't trigger the lint: <code>λ</code>. Perhaps this is fraught in that these all look alike in some fonts, though <code>Il1</code> look alike in many popular fonts.</p>



<a name="211435592"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211435592" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211435592">(Sep 27 2020 at 21:35)</a>:</h4>
<p>A lot depends on the font. I use Monaco and they look nearly identical: <a href="/user_uploads/4715/vwTfbSHdyOQYLOxQ6Op3ytZb/image.png">image.png</a> </p>
<div class="message_inline_image"><a href="/user_uploads/4715/vwTfbSHdyOQYLOxQ6Op3ytZb/image.png" title="image.png"><img src="/user_uploads/4715/vwTfbSHdyOQYLOxQ6Op3ytZb/image.png"></a></div><p>There's already a separate lint if you use both characters (<code>confusable_idents</code>).</p>



<a name="211444291"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211444291" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211444291">(Sep 28 2020 at 01:29)</a>:</h4>
<p><span class="user-mention silent" data-user-id="322310">Jed</span> <a href="#narrow/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457)/near/211432973">said</a>:</p>
<blockquote>
<p>FWIW, they look quite different in DejaVu Sans Mono. Anyway, the <code>mixed_script_confusables</code> also fires on <code>θ</code> (Greek small theta), for which there is no Latin counterpart.</p>
</blockquote>
<p>Basically <code>mixed_script_confusables</code> lint is just telling you that there're some uses of the <code>Greek</code> script, but not enough coverage within that script for the compiler to be sure that you intend to create an API surface with the corresponding natural language.</p>



<a name="211444571"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211444571" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211444571">(Sep 28 2020 at 01:36)</a>:</h4>
<p>i think if you intent to mathematical usages you can use the ones in Mathematical Alphanumeric Symbols block. <br>
𝛉𝛝𝜃𝜗𝜽𝝑𝝷𝞋𝞱𝟅𝚯𝚹𝛩𝛳𝜣𝜭𝝝𝝧𝞗𝞡<br>
These won't trigger <code>mixed_script_confusables</code> but you'll need to allow <code>uncommon_codepoints</code> instead.</p>



<a name="211445043"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211445043" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211445043">(Sep 28 2020 at 01:49)</a>:</h4>
<p>re: output associated confusable code points: <br>
It's best if we could output the corresponding unicode character names. I even wrote a crate for this: <a href="https://github.com/unicode-rs/unicode-charname">https://github.com/unicode-rs/unicode-charname</a> . however we previously discussed and decided the dataset is a bit too heavy to embed in rustc here...<br>
It's not useful to just output the corresponding code points in literal form, since it would be hard for user to distinguish or look up these. Outputting hex digits of code points is viable but still a little too unfriendly for user to look up these themselves.</p>



<a name="211479388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211479388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jannis Harder <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211479388">(Sep 28 2020 at 11:26)</a>:</h4>
<p>Would outputting a link to an online database of unicode characters that includes data on what rustc considers to be lookalikes be an option?</p>



<a name="211479561"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211479561" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211479561">(Sep 28 2020 at 11:28)</a>:</h4>
<p>Here's the actual link: <a href="https://www.unicode.org/Public/security/latest/confusables.txt">https://www.unicode.org/Public/security/latest/confusables.txt</a></p>



<a name="211484960"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/nonascii%20identifiers%28rfc%202457%29/near/211484960" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jannis Harder <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/nonascii.20identifiers(rfc.202457).html#211484960">(Sep 28 2020 at 12:27)</a>:</h4>
<p>I meant as an option for rustc to output as part of the lint, but that would require a unique URL per character and a more friendly presentation</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>